package com.zjsru.controller;

import com.zjsru.pojo.User;
import com.zjsru.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    @Autowired
    private UserService userService;
    @GetMapping("/user/query/{id}")
    public User queryUserById(@PathVariable("id") Long id) {
        return userService.queryById(id);
    }
}
